package cate.game.play.param;


import cate.common.table.fight.scene.row.FightSceneRow;
import cate.game.play.proce.play.PlayCtx;
import easy.java.dev.note.NoteClass;

@NoteClass("战斗参数")
public class FightParam {

	/** A方的战斗调整参数 */
	public FightSideParam sideA = new FightSideParam();
	/** B方的战斗调整参数 */
	public FightSideParam sideB = new FightSideParam();


	public void beforeFight(PlayCtx play){
		sideA.beforeFight(play.teamVS.a);
		sideB.beforeFight(play.teamVS.b);
	}


	public void onFightBegin(PlayCtx play) {
		sideA.onFightBegin(play.teamVS.a);
		sideB.onFightBegin(play.teamVS.b);
	}


	public void loadSceneCfg(FightSceneRow row){
		if (row.skillAppendA != null) {
			for (Integer tid : row.skillAppendA) {
				sideA.skillAppend.addTeamSkill(tid);
			}
		}
		if (row.skillAppendB != null) {
			for (Integer tid : row.skillAppendB) {
				sideB.skillAppend.addTeamSkill(tid);
			}
		}
	}
}
